package com.atguigu.lease.mp.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

@Data
@TableName("user")
public class User {

    // AUTO = mysql的自动主键
    // ASSIGN_ID = 分布式id(雪花id)
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @TableField("name")
    private String name;

    @TableField("age")
    private Integer age;

    @TableField("email")
    private String email;

    @TableField(value = "weight",exist = false)
    private Integer weight;

    @TableLogic(value = "0")// 默认值
    @TableField(value = "is_deleted")
    private Integer deleted;
}